package cn.iocoder.yudao.module.tms.dal.mysql.bandinfo;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.tms.dal.dataobject.bandinfo.BandInfoDO;
import cn.iocoder.yudao.module.tms.controller.admin.bandinfo.vo.BandInfoPageReqVO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 公司band信息 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface BandInfoMapper extends BaseMapperX<BandInfoDO> {

    default PageResult<BandInfoDO> selectPage(BandInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<BandInfoDO>()
                .likeIfPresent(BandInfoDO::getCode, reqVO.getCode())
                .eqIfPresent(BandInfoDO::getStatus, reqVO.getStatus())
                .betweenIfPresent(BandInfoDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(BandInfoDO::getId));
    }

}